Skip to content

feat(web): sticky provider options and Grok composer affordances - #5426

Closed
EnzoTironi wants to merge 3 commits into
pingdotgg:mainfrom
EnzoTironi:pr/web-sticky-options
Closed

feat(web): sticky provider options and Grok composer affordances#5426
EnzoTironi wants to merge 3 commits into
pingdotgg:mainfrom
EnzoTironi:pr/web-sticky-options

Conversation

@EnzoTironi

@EnzoTironi EnzoTironi commented Aug 5, 2026

Copy link
Copy Markdown

What Changed

  • Sticky composer options fall back when the per-thread draft has no options, so picker changes (e.g. Grok effort) reach sendTurn on existing threads
  • Sticky does not override the thread/project model slug
  • Sticky options re-keyed under the selected instance id (custom instances work)
  • Gate built-in /plan /default slash items on showInteractionModeToggle
  • Remove Grok "Early Access" badge

Fixes #5421

Why

Without sticky option fallback, changing effort on an existing thread kept stale thread-turn options. Folding sticky into selectedModel would silently switch models — fixed so sticky is options-only.

UI Changes

Grok Early Access badge removed

Before (badge present):

Before: Grok shows Early Access badge

After (badge removed; Cursor still has Early Access):

After: Grok has no Early Access badge

Composer effort control (sticky options apply to this picker)

Grok 4.5 Reasoning effort menu

Sticky is send-payload behavior (no new components). /plan slash only when the provider exposes plan mode.

Checklist

  • This PR is small and focused (~+237 / 4 files)
  • I explained what changed and why
  • Before/after screenshots for badge removal
  • Effort picker screenshot (sticky option surface)
  • Video N/A

Test plan

  • composerDraftStore unit tests (sticky options, model preserve, instance re-key)

Model: grok-4.5 (Grok Build)


Note

Medium Risk
Changes send-time model option resolution across threads and custom provider instances; wrong precedence could ship stale or cross-provider options, though behavior is heavily unit-tested.

Overview
Sticky composer options now feed deriveEffectiveComposerModelState when the per-thread draft has no options for the selected instance, so picker changes (e.g. Grok reasoning effort) apply on existing threads without overriding the thread/project model slug. Resolution is instance-scoped: options from other instances or kind-keyed legacy drafts no longer block sticky, and sticky options are re-keyed under the active custom instance id.

Grok is included in setProviderModelOptions draft persistence, the Grok Early Access badge is removed in settings metadata, and built-in /plan / /default slash menu items only appear when showInteractionModeToggle is true (hiding no-ops on providers like OpenCode).

Unit tests cover sticky vs draft/thread precedence and Grok sticky persistence.

Reviewed by Cursor Bugbot for commit 1d77552. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add sticky provider options and Grok composer affordances in the chat composer

  • deriveEffectiveComposerModelState now accepts stickyModelSelectionByProvider and uses it as a fallback when the draft lacks options for the selected provider instance, without affecting model slug resolution.
  • Option lookups are scoped to the selected provider instance via a new optionsForInstance helper, replacing the broader modelSelectionByProviderToOptions.
  • Grok is added to the providers whose options are persisted in setProviderModelOptions, matching the behavior of codex, claudeAgent, cursor, and opencode.
  • /plan and /default slash commands are gated behind composerProviderControls.showInteractionModeToggle, hiding them for providers that don't expose an interaction mode toggle.
  • The "Early Access" badge is removed from the Grok provider entry in providerDriverMeta.ts.

Macroscope summarized 1d77552.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3d1ee52c-3742-43a8-b678-ff97d59e5982

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Aug 5, 2026
Comment thread apps/web/src/composerDraftStore.ts Outdated
Comment thread apps/web/src/composerDraftStore.ts Outdated
Comment thread apps/web/src/composerDraftStore.ts Outdated
@macroscopeapp

macroscopeapp Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new feature (sticky provider options) that changes how model options persist across threads, adding new user-facing capability. New features introducing runtime behavior changes warrant human review.

You can customize Macroscope's approvability policy. Learn more.

@EnzoTironi

Copy link
Copy Markdown
Author

Review findings from Bugbot/Macroscope for this slice are fixed on the Zoen product tip (zoen/main @ 16474ab0d). Will restack / re-push these PR heads after further slim-slicing. Open remaining: effort restart without session.exited (or adopt #5403 set_model path).

@EnzoTironi
EnzoTironi force-pushed the pr/web-sticky-options branch from d93ecf6 to ad5b707 Compare August 5, 2026 16:22
@EnzoTironi
EnzoTironi force-pushed the pr/web-sticky-options branch from ad5b707 to d882090 Compare August 5, 2026 16:22
@EnzoTironi EnzoTironi changed the title feat(web): sticky provider options for sendTurn feat(web): sticky provider options and Grok composer affordances Aug 5, 2026
Comment thread apps/web/src/composerDraftStore.ts
@EnzoTironi

Copy link
Copy Markdown
Author

UI screenshots

Badge removal

Before — Grok had Early Access:

before

After — badge removed (Cursor keeps Early Access):

after

Sticky options surface (effort picker)

effort

Draft options for another provider/instance no longer short-circuit sticky
or thread options for the currently selected instance.
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). and removed size:M 30-99 changed lines (additions + deletions). labels Aug 5, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit cb97299. Configure here.

Comment thread apps/web/src/composerDraftStore.ts
When the selected instance already has a draft entry without options, skip
legacy kind-key option fallback so sticky/thread options can apply — matching
the model path which only falls back when the instance entry is missing.
@EnzoTironi EnzoTironi closed this by deleting the head repository Aug 6, 2026
@EnzoTironi

Copy link
Copy Markdown
Author

Head fork was deleted and GitHub closed this PR permanently (cannot reopen).

Correct recovery PR: pull request title must not be blank

Same commits/branch tip as this one. #5424 and #5425 stay closed on purpose (absorbed into the Grok native parity PR).

@EnzoTironi

Copy link
Copy Markdown
Author

Correction — recovery PR is: #5504

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Web: sticky provider options win over stale thread selection

1 participant